package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallCustomerAccount;
import com.appkubes.mall.core.po.MallCustomerAccountExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallCustomerAccountMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerAccountSqlProvider.class, method="countByExample")
    long countByExample(MallCustomerAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallCustomerAccountSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallCustomerAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_customer_account",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String customerKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_customer_account (customer_key, app_key, ",
        "balance, create_time, ",
        "update_time, version)",
        "values (#{customerKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{balance,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallCustomerAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallCustomerAccountSqlProvider.class, method="insertSelective")
    int insertSelective(MallCustomerAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="balance", property="balance", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerAccount> selectByExampleWithRowbounds(MallCustomerAccountExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="balance", property="balance", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerAccount> selectByExample(MallCustomerAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "customer_key, app_key, balance, create_time, update_time, version",
        "from mall_customer_account",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="balance", property="balance", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallCustomerAccount selectByPrimaryKey(String customerKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerAccountSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallCustomerAccount record, @Param("example") MallCustomerAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerAccountSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallCustomerAccount record, @Param("example") MallCustomerAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerAccountSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallCustomerAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_account
     *
     * @mbg.generated
     */
    @Update({
        "update mall_customer_account",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "balance = #{balance,jdbcType=DECIMAL},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where customer_key = #{customerKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallCustomerAccount record);
}